package BehaviorModel.interpreterModel;

import java.util.HashMap;

/**
 * 功能描述: 变量解析器
 * 2024/05/13
 *
 * @see AExpression
 * ZhangYi
 */
public class VarExpression extends AExpression {
    private String key;

    public VarExpression(String key) {
        this.key = key;
    }
    @Override
    public int interpret(HashMap<String, Integer> hashMap) {
        return hashMap.get(this.key);
    }
}
